<?php
namespace Models;
use Resources;
class Users {
    
    public function __construct(){
        $this->db = new Resources\Database;
    }
    
    public function GetAll($limit=5){        
        $result = $this->db->results("SELECT * FROM psn_users ORDER BY id_user LIMIT $limit");
    }
    
    public function FindById($id){
        $result = $this->db->results("SELECT * FROM psn_users WHERE id_user = $id ORDER BY id_user LIMIT 1");
    }
    
    public function FindAll($where,$limit=5){
        $result = $this->db->results("SELECT * FROM psn_users WHERE $where ORDER BY id_user LIMIT $limit");
    }
}